
<%@ page import="org.tailor.Shirt"%>
<html>
<head>

<meta name="layout" content="mainLayout" />
<g:set var="entityName"
	value="${message(code: 'shirt.label', default: 'Shirt')}" />

	
</head>
<body>
	<div id="col_middle">
	
	<h1>
			<g:message   code="default.show.label" args="[entityName]" />
		</h1><br/>
				<g:if test="${flash.message}">
			<div class="message">
				${flash.message}
			</div>
		</g:if>
		<div class="show">
			<table>
				<tbody>

					<tr class="prop" >
						<td valign="top" class="name">
						<g:message code="shirt.id.label" default="Id" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance, field: "id")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.shirtID.label" default="Shirt ID" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance, field: "shirtID")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.designName.label" default="Design Name" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance, field: "designName")}
							<br/><br/>
						</td>

					</tr>
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.designPicture.label" default="Design Picture" />
						</td>

						<td valign="top" class="value">
						<img src="<g:createLink controller='shirt' action='renderImage' id='${fieldValue(bean: shirtInstance, field:"id")}'/>"
				 width="120" height="120"	title="${fieldValue(bean: shirtInstance, field:"id")}"
				alt="No Photo" />
				<br/><br/>
						</td>

					</tr>
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.fabric.label" default="fabric" />
						</td>

						<td valign="top" style="text-align: left;" class="value">
							
								<g:each in="${shirtInstance.fabric}" var="fabricvar">
									
										${fabricvar.fabricName}<br/> <img 
								src="<g:createLink controller='fabric' action='renderImage' id='${fabricvar.id}'/>"
								width="100" height="100"
								title="${fieldValue(bean:shirtInstance.fabric, field: "fabricName")}"
								alt="No Photo" align="absmiddle" />
									
								</g:each>
															
								<br/><br/>
							</td>

					</tr>
 							

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.collar.label" default="Collar" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance.collar, field: "collarName")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.cuff.label" default="Cuff" /></td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance.cuff, field: "cuffName")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.monoText.label" default="Mono Text" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance, field: "monoText")}
						
						<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.monogram.label" default="Monogram" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance.monogram, field: "monogramID")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.note.label" default="Note" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance, field: "note")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.otherAddOn.label" default="Other Add On" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance.otherAddOn, field: "otherAddOnID")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.pocketType.label" default="Pocket Type" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance, field: "pocketType")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.rating.label" default="Rating" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance.rating, field: "score")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.shirtBack.label" default="Shirt Back" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance, field: "shirtBack")}
						
						<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.shirtFront.label" default="Shirt Front" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance, field: "shirtFront")}
					<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.shirtName.label" default="Shirt Name" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance, field: "shirtName")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.shoulderFit.label" default="Shoulder Fit" />
						</td>

						<td valign="top" class="value">
							${fieldValue(bean: shirtInstance, field: "shoulderFit")}
							<br/><br/>
						</td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="shirt.tailor.label" default="Tailor" />
						</td>

						<td valign="top" class="value"><g:link controller="tailor"
								action="show" id="${shirtInstance?.tailor?.id}">
								${shirtInstance?.tailor?.encodeAsHTML()}
							</g:link>
						<br/><br/>
						</td>

					</tr>

				</tbody>
			</table>
		</div>
		<div class="buttons">
			<g:form>
				<g:hiddenField name="id" value="${shirtInstance?.id}" />
				<table>
				<tr>
				<td><span class="button"><g:actionSubmit class="edit"
						action="edit"
						value="${message(code: 'default.button.edit.label', default: 'Edit')}" />
				</span></td>
				<td>
				<span class="button"><g:actionSubmit class="delete"
						action="delete"
						value="${message(code: 'default.button.delete.label', default: 'Delete')}"
						onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</span></td>
				</tr>
				</table>
			</g:form>
		</div>
		
	</div>
</body>
</html>
